package com.wxtl.action;

import com.wxtl.action.base.BaseAction;
import com.wxtl.entity.Dog;
import com.wxtl.service.DogService;
import com.wxtl.util.Page;

public class DogAction extends BaseAction {
	private Dog dog=new Dog();
	private DogService dogService;
	private int dealFlag = 0;
	
	private int[] dogIds;
	
	public int[] getDogIds() {
		return dogIds;
	}

	public void setDogIds(int[] dogIds) {
		this.dogIds = dogIds;
	}

	public int getDealFlag() {
		return dealFlag;
	}

	public void setDealFlag(int dealFlag) {
		this.dealFlag = dealFlag;
	}

	public Dog getDog() {
		return dog;
	}

	public void setDog(Dog dog) {
		this.dog = dog;
	}

	public DogService getDogService() {
		return dogService;
	}

	public void setDogService(DogService dogService) {
		this.dogService = dogService;
	}

	public String query(){
		Page pageData=dogService.query(super.getDataGrid(),dog , dealFlag);
		setPageData(pageData);
		return SUCCESS;
	}
	
	public String deal(){
		dogService.deal(dogIds,dog.getAgentsn());
		return SUCCESS;
	}
}
